﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Base.Master" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="Exhibition.Manage.UserList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function RowDoubleClick(s, e) {

            var key = s.GetRowKey(e.visibleIndex);
            $("#hfKey").val(key);
             s.GetRowValues(e.visibleIndex, 'UserType', PublicationClickCallback);//
             
            
            
         
        }
        function PublicationClickCallback(values) {
            var hfkey = $("#hfKey").val();
            if (values == "1") {
                YXQ.Manager.OpenDialog("CompUserDetail.aspx?id=" + hfkey, "查看详情");

               // YXQ.Common.Block("CompUserDetail.aspx?id=" + hfkey);
            } else {
                // YXQ.Common.Block("UserDetail.aspx?id=" + hfkey);
                YXQ.Manager.OpenDialog("UserDetail.aspx?id=" + hfkey, "查看详情");

            }

        }

        function block() {
             <%if (tpid == 1)
               {%>
            YXQ.Manager.OpenDialog("CompUserDetail.aspx");
            //YXQ.Common.Block("CompUserDetail.aspx");
            <%
               }
               else
               {%>
            YXQ.Manager.OpenDialog("UserDetail.aspx");
          //  YXQ.Common.Block("UserDetail.aspx");
            <%}
         %>
         }


    </script>
    <input type="hidden" id="hfKey" />
    <table cellspacing="0" cellpadding="0" width="100%" class="admintable">
        <tr>
            <td>
                <table cellspacing="0" cellpadding="0" class="admintable01">
                    <tr>
                        <td style="width: 20px;">
                            <img src="../images/carfromtable_01.gif" style="margin-top: 2px;" />
                        </td>
                        <td>
                            <b>位置：</b><asp:Literal ID="ltrTbName" runat="server"></asp:Literal>列表
                        </td>
                        <td style="width: 50px;"></td>
                        <td style="width: 50px;"></td>
                        <td style="width: 15px;"></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table cellpadding="0" cellspacing="0" style="margin-bottom: 5px; margin-top: 5px; margin-left: 14px;">
                    <tr>
                        <td>

                            <input type="button" id="btnAdd" class="bt_wb1" value="添加" runat="server" onclick="block();" />
                            <%-- <dx:ASPxButton ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" />--%>
                        </td>
                        <td style="padding-left: 4px">
                            <dx:ASPxButton ID="btnExport" Text="导出" runat="server" OnClick="btnExport_Click">
                            </dx:ASPxButton>
                        </td>
                        <td style="padding-left: 4px">
                            <dx:ASPxButton ID="btnSelAll" runat="server" Text="全选" AutoPostBack="false">
                                <ClientSideEvents Click="function() { grid.SelectAllRowsOnPage() }" />
                            </dx:ASPxButton>
                        </td>
                        <td style="padding-left: 4px">
                            <dx:ASPxButton ID="btnUnSelAll" runat="server" Text="取消全选" AutoPostBack="false">
                                <ClientSideEvents Click="function() { grid.UnselectAllRowsOnPage() }" />
                            </dx:ASPxButton>
                        </td>
                        <td style="padding-left: 4px">
                            <dx:ASPxButton ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" />
                        </td>
                        <td style="padding-left: 4px">
                            <dx:ASPxButton ID="btnGroup" runat="server" Text="拖动分组" OnClick="btnGroup_Click" />
                        </td>

                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center">
                <dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False"
                    OnBeforeColumnSortingGrouping="grid_BeforeColumnSortingGrouping"
                    OnProcessColumnAutoFilter="grid_ProcessColumnAutoFilter" OnCustomColumnDisplayText="grid_CustomColumnDisplayText"
                    DataSourceForceStandardPaging="false" ClientInstanceName="grid">

                    <ClientSideEvents RowDblClick="RowDoubleClick" />
                    <Settings ShowHorizontalScrollBar="true" VerticalScrollableHeight="320" ShowVerticalScrollBar="true" ShowGroupedColumns="true" ShowFilterRow="true" />
                    <SettingsBehavior AllowMultiSelection="true" AllowFocusedRow="True" AutoExpandAllGroups="true" />
                    <SettingsPager Visible="false">
                    </SettingsPager>

                </dx:ASPxGridView>
                <dx:ASPxPager ID="pager" runat="server" OnPageIndexChanged="pager_PageIndexChanged"></dx:ASPxPager>
                <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="grid">
                </dx:ASPxGridViewExporter>
            </td>
        </tr>
    </table>

</asp:Content>
